<?php if (!defined('THINK_PATH')) exit();?>    <table class="table table-bordered">
        <thead>
            <tr>
                <!-- <th><input type="checkbox"  id="checkAll" /> 全选</th> -->
                <th>拍卖单号</th>
                <th>车型</th>
                <th>所在地</th>
                <th>车牌号</th>
                <?php if ($params['search']['status'] == $dataStatus['pending'] || $params['search']['status'] == $dataStatus['following']) { ?>
                <th>车况级别</th>
                <?php } ?>
                <th>车商联系人</th>
                <th>联系人电话</th>
                <?php if ($params['search']['status'] == $dataStatus['pending'] || $params['search']['status'] == $dataStatus['following']) { ?>
                <th>验车截止时间</th>
                <?php } else { ?>
                <th>验车时间</th>
                <?php } ?>
                <?php if ($params['search']['status'] == $dataStatus['following'] || $params['search']['status'] == $dataStatus['success'] || $params['search']['status'] == $dataStatus['faild'] || $params['search']['status'] == $dataStatus['locked']):?>
                <th>操作人</th>
                <?php endif;?>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>    
        <?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
                <!-- <td><input type="checkbox" name="order_ids[]"/></td> -->
                <td><?php echo ($vo["order_no"]); ?></td>
                <td><a href="/Car/report/car_id/<?php echo ($vo["car_id"]); ?>" target="_blank"><?php echo ($vo["model"]); ?></a></td>
                <td><?php echo ($vo["location_area_name"]); ?></td>                
                <td><?php echo ($vo["car_plate_number"]); ?></td>
                <?php if ($params['search']['status'] == $dataStatus['pending'] || $params['search']['status'] == $dataStatus['following']) { ?>
                <td><?php echo ($vo["composite_state"]); echo ($vo["accident_level"]); ?></td>
                <?php } ?>
                <td><?php echo ($vo["contact_person"]); ?></td>
                <td><?php echo ($vo["contact_mobile"]); ?></td>

                <?php if ($params['search']['status'] == $dataStatus['pending'] || $params['search']['status'] == $dataStatus['following']) { ?>
                    <?php if (isset($vo['check_limit_time']) && strtotime($vo['check_limit_time']) > 0) { ?>
                    <td style="color: <?php echo ($vo["color"]); ?>" > <?php echo (date('Y-m-d H:i',strtotime($vo["check_limit_time"]))); ?></td>
                    <?php } ?>
                <?php } else { ?>
                    <?php if (isset($vo['check_time']) && strtotime($vo['check_time']) > 0) { ?>
                    <td> <?php echo (date('Y-m-d H:i',strtotime($vo["check_time"]))); ?></td>
                    <?php } else { ?>
                    <td>-----</td>
                 <?php } ?>
                <?php } ?>
                <?php if ($params['search']['status'] == $dataStatus['following'] || $params['search']['status'] == $dataStatus['success'] || $params['search']['status'] == $dataStatus['faild'] || $params['search']['status'] == $dataStatus['locked']):?>
                <td><?php echo ($vo["operator"]); ?></td>
                <?php endif;?>
                <td>
                    <?php if ($params['search']['status'] == $dataStatus['pending']) { ?>
                    <?php if ($vo['is_lock'] == 1): ?>
                        <a href="javascript:" class="ash-grey">通知</a>
                        <a href="javascript:" class="ash-grey">发送</a>
                    <?php else: ?>
                        <a href='#' onclick="return confirm_note(<?php echo ($vo["check_id"]); ?>)">通知</a>
                        <a href='#' onclick="return confirm_msg('<?php echo ($vo["order_id"]); ?>', '<?php echo ($vo["order_no"]); ?>', '<?php echo (date("Y年m月d日H时I分",strtotime($vo["check_limit_time"]))); ?>', '<?php echo ($vo["check_addr"]); ?>')">发送</a>
                    <?php endif ?>
                    <?php if ($vo['is_again_void']): ?>
                            <a href="javascript:" onclick="violate(<?php echo ($vo["order_id"]); ?>,1)">违约</a>
                    <?php endif ?>
                    <?php } elseif ($params['search']['status'] == $dataStatus['following']) { ?>
                    <?php if ($vo['is_lock'] == 1): ?>
                        <a href="javascript:" class="ash-grey">验车</a>
                        <a href="javascript:" class="ash-grey">发送</a>
                    <?php else: ?>
                        <a href="/DealerCheckCar/deal?id=<?php echo ($vo["order_id"]); ?>">验车</a>
                        <a href='#' onclick="return confirm_msg('<?php echo ($vo["order_id"]); ?>', '<?php echo ($vo["order_no"]); ?>', '<?php echo ($vo["check_limit_time"]); ?>', '<?php echo ($vo["check_addr"]); ?>')">发送</a>
                    <?php endif ?>
                    <?php if ($vo['is_again_void']): ?>
                            <a href="javascript:" onclick="violate(<?php echo ($vo["order_id"]); ?>,1)">违约</a>
                    <?php endif ?>
                    
                    <?php if ($vo['is_show_dispute']): ?>
                            <!-- <a href="javascript:" onclick="violate(<?php echo ($vo["order_id"]); ?>,2)">争议</a> -->
                            <a href="/DealerCheckCar/dispute/order_id/<?php echo ($vo["order_id"]); ?>" target="_blank">争议</a>
                    <?php endif ?>
                    <?php } else { ?>
                    <a href="/DealerCheckCar/view?id=<?php echo ($vo["order_id"]); ?>" target="_blank">查看</a>
                    <?php } ?>
                </td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <div class="error msg" style="color: red; text-align:left;"><?php echo ($errMsg); ?></div>
    <div class="pageFaye"><div class="pager"><?php echo ($page); ?></div><div class="clear"></div></div>
<!--违约-->
<div class="chenggong2">
    <span class="paidan">您确定要置为<i>违约</i>吗?</span>
    <div class="shenhei-btn">
        <input type="hidden" name="order_id"  value="" />
        <input type="hidden" name="act"  id="act" value="1" />
        <input type="button" value="确定" class="determine" />
        <input type="button" value="取消" class="cancel" />
    </div>
</div>
<div class="yunBei"></div>
<script>
    function violate(order_id,act){
        $('.chenggong2').css('display', 'block');
        $('#act').val(act);
        if (act == '1') {
            $('.paidan i').text('违约');
        } 
        $('.yunBei').css({'display':'block',"zIndex":999});
        $('input[name=order_id]').val(order_id);
    }
    $(".determine").on('click', function () {
        var order_id = $('input[name=order_id]').val();
        var act = $('#act').val();
        if (act == 1) {
            var url = '/DealerCheckCar/violate';
            var param = {
                'order_id':order_id
            };
        }
        var btn_obj = $(this);
        btn_obj.val("提交中...").attr("disabled",'disabled');
        $.post(url, param, function (data) {
            if (data.code == '200') {
                btn_alert(data.msg);
                $('.chenggong2').fadeOut();
                btn_obj.val("确定").removeAttr("disabled style");
                setTimeout(function () {
                        window.location.reload();
                    }, 500);
            } else {
                shibai_alert(data.msg)
                btn_obj.val("确定").removeAttr("disabled style");
                $('.chenggong2').fadeOut();
            }
            $('.yunBei').css({'display':'none',"zIndex":999});
        }, 'json');
    });
    $(".cancel").on('click', function () {
        $('.chenggong2').fadeOut();
        $('.yunBei').css({'display':'none',"zIndex":999});
    });

</script>